package com.bestcem.xm.member.grpc.service.param.member;

import com.bestcem.xm.common.core.constant.RegTypes;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 联系人参数扩展字段校验
 *
 * @author yf.wang <yf.wang@idiaoyan.com>
 * @version V1.0
 * @date 2021/7/16
 */

@Getter
@Setter
public class MemberFieldParam {

    @NotNull(message = "扩展字段id不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "扩展字段id格式错误")
    private String id;

    @NotNull(message = "企业标识不能为空")
    @Pattern(regexp = RegTypes.OBJECT_ID, message = "企业标识格式错误")
    private String orgId;

    @NotNull(message = "扩展字段名称")
    private String name;

    @NotNull(message = "扩展字段类型不能为空")
    private Integer type;

    private String value;

    @NotNull(message = "联系人类型不能为空")
    private Integer attribute;
}
